/**
 * Learn more about deep linking with React Navigation
 * https://reactnavigation.org/docs/deep-linking
 * https://reactnavigation.org/docs/configuring-links
 */

import { LinkingOptions } from '@react-navigation/native';
import * as Linking from 'expo-linking';

import { RootStackParamList } from '../types';

const linking: LinkingOptions<RootStackParamList> = {
  prefixes: [Linking.makeUrl('/')],
  config: {
    screens: {
      Root: {
        screens: {
          TabOne: {
            screens: {
              Index: 'Index',
            },
          },
          TabTwo: {
            screens: {
              CategoryList: 'CategoryList',
            },
          },
          Mine: {
            screens: {
              Mine: 'Mine',
            },
          },
        },
      },
      Index: '/reactnative/index.html',
      CategoryList: '/reactnative/index.html/CategoryList',
      Mine: '/reactnative/index.html/Mine',
      Login: '/reactnative/index.html/Login',
      Register: '/reactnative/index.html/Register',
      SearchList: '/reactnative/index.html/SearchList',
      GoodDetail: '/reactnative/index.html/GoodDetail',
      NotFound: '*',
    },
  },
};

export default linking;
